module.exports = {
  value: {
    type: [String, Array, Object],
    default: '',
    name: '输入值',
    filedType: 'value'
  },

  action: {
    type: String,
    default: 'http://192.168.102.224/api/twasp/fs/fs/file/upload',
    name: '上传的地址',
    filedType: 'sync'
  },

  size: {
    type: String,
    default: 'small',
    name: '按钮尺寸',
    filedType: 'select',
    options: [
      {
        name: '小尺寸',
        value: 'small'
      },
      {
        name: '中尺寸',
        value: 'medium'
      },
      {
        name: 'mini',
        value: 'mini'
      }
    ]
  },

  limit: {
    type: String,
    default: '',
    name: '最大允许上传个数',
    filedType: 'string'
  },

  multiple: {
    type: Boolean,
    default: false,
    name: '支持多选',
    filedType: 'switch'
  },

  drag: {
    type: String,
    default: false,
    name: '拖拽上传',
    filedType: 'switch'
  },

  autoupload: {
    type: Boolean,
    default: true,
    name: '选取文件后立即上传',
    filedType: 'switch'
  },

  listtype: {
    type: String,
    default: 'text',
    name: '文件列表的类型',
    filedType: 'select',
    options: [
      {
        name: 'text',
        value: 'text'
      },
      {
        name: 'picture',
        value: 'picture'
      },
      {
        name: 'picture-card',
        value: 'picture-card'
      },
      {
        name: '头像上传',
        value: 'avatar'
      }
    ]
  },

  placeholder: {
    type: String,
    default: '<span style="padding: 0px 20px;">+ 作品上传</span>',
    name: '按钮文本',
    filedType: 'string'
  },
  accept: {
    type: String,
    default: '',
    name: '接受上传的文件类型',
    filedType: 'string'
  },
  maxsize: {
    type: String,
    default: '5M',
    name: '上传文件大小限制',
    filedType: 'string'
  },

  showfilelist: {
    type: Boolean,
    default: false,
    name: '是否显示已上传文件列表',
    filedType: 'switch'
  },
  withcredentials: {
    type: Boolean,
    default: false,
    name: '支持发送cookie凭证信息',
    filedType: 'switch'
  },

  tips: {
    type: String,
    default: '<div style=\"width:100%;text-align:left;\">温馨提示：上传作品附件的数量不能为0； 上传作品要求：支持.docx .doc .wps .pdf .txt,.xlsx .xls .et .jpg .jpeg .bmp .png .gif .swf .rar .zip格式文件； 文件大小不超过5M。</div>',
    name: '上传要求',
    filedType: 'string'
  },
  useCustFilelist: {
    type: Boolean,
    default: true,
    name: '自定义文件列表',
    filedType: 'switch'
  },
  useCustFileicon: {
    type: Boolean,
    default: true,
    name: '自定义文件图标',
    filedType: 'switch'
  },
  icons: {
    type: Array,
    default () {
      return []
    },
    name: '文件类型图标列表',
    nameTip: '0other,1jpg,2doc,3xls,4ppt,5pdf,6txt,7zip,8flv',
    filedType: 'file',
    limit: 100,
    maxSize: 1024
  },

  bgColor: {
    type: String,
    default: '#f4f8fb',
    name: '背景色',
    filedType: 'color'
  },

  padding: {
    type: String,
    default: '20px',
    name: '内边距',
    filedType: 'string'
  },

  listpadding: {
    type: String,
    default: '0 15px',
    name: '内边距',
    filedType: 'string'
  },
  listmargin: {
    type: String,
    default: '',
    name: '外边距',
    filedType: 'string'
  },

  textalign: {
    type: String,
    default: 'center',
    name: '文字居中',
    filedType: 'string'
  },

  lineHeight: {
    type: String,
    default: '2',
    name: '列表行高',
    filedType: 'string'
  },

  beforeUpload: {
    type: Function,
    default: '',
    name: '上传前置函数',
    filedType: 'function'
  },
  beforeRemove: {
    type: Function,
    default: '',
    name: '删除文件之前',
    filedType: 'function'
  },
  onPreview: {
    type: Function,
    default: '',
    name: '文件列表预览',
    filedType: 'function'
  },
  onRemove: {
    type: Function,
    default: '',
    name: '文件列表移除',
    filedType: 'function'
  },
  onSuccess: {
    type: Function,
    default: '',
    name: '文件上传成功',
    filedType: 'function'
  },
  onError: {
    type: Function,
    default: '',
    name: '文件上传失败',
    filedType: 'function'
  },
  onProgress: {
    type: Function,
    default: '',
    name: '文件上传过程',
    filedType: 'function'
  },
  onExceed: {
    type: Function,
    default: '',
    name: '文件超出个数限制',
    filedType: 'function'
  },
  onChange: {
    type: Function,
    default: '',
    name: '上传change函数',
    filedType: 'function'
  },
  // list: {
  //   type: Array,
  //   default () {
  //     return []
  //   },
  //   name: '文件列表',
  //   filedType: 'api'
  // },
  avatarBg: {
    type: String,
    default: [],
    name: '头像未上传时背景',
    filedType: 'file',
    limit: 1,
    maxSize: 1024
  },
  avatarWidth: {
    type: String,
    default: '100px',
    name: '头像宽度',
    filedType: 'string'
  },
  avatarHeight: {
    type: String,
    default: '100px',
    name: '头像高度',
    filedType: 'string'
  },
  avatarRadius: {
    type: String,
    default: '50px',
    name: '头像圆角',
    filedType: 'string'
  },
  avatarColor: {
    type: String,
    default: '#f4f8fb',
    name: '头像操作字体色',
    filedType: 'color'
  },
  avatarBgColor: {
    type: String,
    default: '#f4f8fb',
    name: '头像蒙层背景色',
    filedType: 'color'
  },
  validRules: {
    type: Array,
    default () {
      return [
        { disabled: false, message: '禁用' }
      ]
    },
    name: '校验规则',
    filedType: 'api'
  },
  closeAlert: {
    type: Boolean,
    default: false,
    name: '关闭删除提示弹窗',
    filedType: 'switch'
  },
}
